<div class="row">

<div class="col-md-3">
    <!-- About Me Box -->
    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title">家长</h3>
            <div class="input-group pull-right">
                <a style="margin:3px;" href="javascript:void(0)" data-url="{{ url('/admin/users', $user->id.'/edit') }}" onclick="jumpfun(this)" class="X-Small btn-xs text-primary "><i class="fa fa-edit"></i> 编辑</a>
                <a style="margin:3px;" href="javascript:void(0)" data-url="{{ url('/admin/users/child', $user->id) }}" onclick="jumpfun(this)" class="X-Small btn-xs text-success "><i class="fa fa-plus"></i> 宝宝</a>
            </div>
        </div>
        <!-- /.box-header -->
        <div class="box-body">
            <strong><i class="fa fa-user margin-r-5"></i> 姓名</strong>

            <p class="text-muted">
                {{ $user->name }}
            </p>

            <hr>
            <strong><i class="fa fa-book margin-r-5"></i> 联系方式</strong>

            <p class="text-muted">
                {{ $user->mobile  }}, {{ $user->email }}
            </p>

            <hr>

            <strong><i class="fa fa-map-marker margin-r-5"></i> 住址</strong>

            <p class="text-muted">{{ $user->address }}</p>

            <hr>

            <strong><i class="fa fa-pencil margin-r-5"></i> 注册时间</strong>

            <p class="text-muted">{{ $user->created_at }}</p>

            <hr>

            <strong><i class="fa fa-file-text-o margin-r-5"></i> 备注</strong>

            <p>{{ $user->remarks }}</p>
        </div>
        <!-- /.box-body -->
    </div>
</div>

@if($children)
    @foreach($children as $child)
        <div class="col-sm-3">
            <!-- About Me Box -->
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title"> {{ $child->name }}</h3>
                    <div class="input-group pull-right">
                        <a style="margin:3px;" href="javascript:void(0)" data-url="{{ url('/admin/users/card', $child->id) }}" onclick="jumpfun(this)" class="X-Small btn-xs text-fuchsia "><i class="fa fa-plus"></i> 充值</a>
                        <a style="margin:3px;" href="javascript:void(0)" data-url="{{ url('/admin/children', $child->id.'/edit') }}" onclick="jumpfun(this)" class="X-Small btn-xs text-success "><i class="fa fa-edit"></i> 编辑</a>
                        @permission('child_delete')
                        <a style="margin:3px;" href="javascript:void(0)" data-url="{{ url('/admin/children', $child->id) }}" onclick="delfun(this)" class="X-Small btn-xs text-danger "><i class="fa fa-remove"></i> </a>
                        @endpermission
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <strong><i class="fa fa-book margin-r-5"></i> 小名</strong>

                    <p class="text-muted">
                        {{ $child->nice_name }}
                    </p>

                    <hr>

                    <strong><i class="fa fa-map-marker margin-r-5"></i> 性别</strong>

                    <p class="text-muted">{{ $child->sex?'男':'女' }}</p>

                    <hr>

                    <strong><i class="fa fa-pencil margin-r-5"></i> 生日</strong>

                    <p class="text-muted">{{ $child->birthday }}</p>
                </div>
                <!-- /.box-body -->
            </div>
        </div>
    @endforeach
@endif

</div>